(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
lessElements(l, t) → lessE(l, t, 0)
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0) → false
le(0, m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(n, l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, n, t2)) → append(toList(t1), cons(n, toList(t2)))
append(nil, l2) → l2
append(cons(n, l1), l2) → cons(n, append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
S is empty.
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
cons/0
node/1
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
lessElements(l, t) → lessE(l, t, 0')
lessE(l, t, n) → if(le(length(l), n), le(length(toList(t)), n), l, t, n)
if(true, b, l, t, n) → l
if(false, true, l, t, n) → t
if(false, false, l, t, n) → lessE(l, t, s(n))
length(nil) → 0'
length(cons(l)) → s(length(l))
toList(leaf) → nil
toList(node(t1, t2)) → append(toList(t1), cons(toList(t2)))
append(nil, l2) → l2
append(cons(l1), l2) → cons(append(l1, l2))
le(s(n), 0') → false
le(0', m) → true
le(s(n), s(m)) → le(n, m)
a → c
a → d
Types:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
lessE,
le,
length,
toList,
appendThey will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList
(8) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
le, lessE, length, toList, append
They will be analysed ascendingly in the following order:
le < lessE
length < lessE
toList < lessE
append < toList
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
le(
gen_0':s6_0(
+(
1,
n8_0)),
gen_0':s6_0(
n8_0)) →
false, rt ∈ Ω(1 + n8
0)
Induction Base:
le(gen_0':s6_0(+(1, 0)), gen_0':s6_0(0)) →RΩ(1)
false
Induction Step:
le(gen_0':s6_0(+(1, +(n8_0, 1))), gen_0':s6_0(+(n8_0, 1))) →RΩ(1)
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) →IH
false
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
length, lessE, toList, append
They will be analysed ascendingly in the following order:
length < lessE
toList < lessE
append < toList
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
length(
gen_nil:cons:leaf:node5_0(
n331_0)) →
gen_0':s6_0(
n331_0), rt ∈ Ω(1 + n331
0)
Induction Base:
length(gen_nil:cons:leaf:node5_0(0)) →RΩ(1)
0'
Induction Step:
length(gen_nil:cons:leaf:node5_0(+(n331_0, 1))) →RΩ(1)
s(length(gen_nil:cons:leaf:node5_0(n331_0))) →IH
s(gen_0':s6_0(c332_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n331_0)) → gen_0':s6_0(n331_0), rt ∈ Ω(1 + n3310)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
append, lessE, toList
They will be analysed ascendingly in the following order:
toList < lessE
append < toList
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
append(
gen_nil:cons:leaf:node5_0(
n616_0),
gen_nil:cons:leaf:node5_0(
b)) →
gen_nil:cons:leaf:node5_0(
+(
n616_0,
b)), rt ∈ Ω(1 + n616
0)
Induction Base:
append(gen_nil:cons:leaf:node5_0(0), gen_nil:cons:leaf:node5_0(b)) →RΩ(1)
gen_nil:cons:leaf:node5_0(b)
Induction Step:
append(gen_nil:cons:leaf:node5_0(+(n616_0, 1)), gen_nil:cons:leaf:node5_0(b)) →RΩ(1)
cons(append(gen_nil:cons:leaf:node5_0(n616_0), gen_nil:cons:leaf:node5_0(b))) →IH
cons(gen_nil:cons:leaf:node5_0(+(b, c617_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n331_0)) → gen_0':s6_0(n331_0), rt ∈ Ω(1 + n3310)
append(gen_nil:cons:leaf:node5_0(n616_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n616_0, b)), rt ∈ Ω(1 + n6160)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
toList, lessE
They will be analysed ascendingly in the following order:
toList < lessE
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol toList.
(19) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n331_0)) → gen_0':s6_0(n331_0), rt ∈ Ω(1 + n3310)
append(gen_nil:cons:leaf:node5_0(n616_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n616_0, b)), rt ∈ Ω(1 + n6160)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
The following defined symbols remain to be analysed:
lessE
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol lessE.
(21) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n331_0)) → gen_0':s6_0(n331_0), rt ∈ Ω(1 + n3310)
append(gen_nil:cons:leaf:node5_0(n616_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n616_0, b)), rt ∈ Ω(1 + n6160)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
(23) BOUNDS(n^1, INF)
(24) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n331_0)) → gen_0':s6_0(n331_0), rt ∈ Ω(1 + n3310)
append(gen_nil:cons:leaf:node5_0(n616_0), gen_nil:cons:leaf:node5_0(b)) → gen_nil:cons:leaf:node5_0(+(n616_0, b)), rt ∈ Ω(1 + n6160)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
(26) BOUNDS(n^1, INF)
(27) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
length(gen_nil:cons:leaf:node5_0(n331_0)) → gen_0':s6_0(n331_0), rt ∈ Ω(1 + n3310)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
(29) BOUNDS(n^1, INF)
(30) Obligation:
Innermost TRS:
Rules:
lessElements(
l,
t) →
lessE(
l,
t,
0')
lessE(
l,
t,
n) →
if(
le(
length(
l),
n),
le(
length(
toList(
t)),
n),
l,
t,
n)
if(
true,
b,
l,
t,
n) →
lif(
false,
true,
l,
t,
n) →
tif(
false,
false,
l,
t,
n) →
lessE(
l,
t,
s(
n))
length(
nil) →
0'length(
cons(
l)) →
s(
length(
l))
toList(
leaf) →
niltoList(
node(
t1,
t2)) →
append(
toList(
t1),
cons(
toList(
t2)))
append(
nil,
l2) →
l2append(
cons(
l1),
l2) →
cons(
append(
l1,
l2))
le(
s(
n),
0') →
falsele(
0',
m) →
truele(
s(
n),
s(
m)) →
le(
n,
m)
a →
ca →
dTypes:
lessElements :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
lessE :: nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
0' :: 0':s
if :: true:false → true:false → nil:cons:leaf:node → nil:cons:leaf:node → 0':s → nil:cons:leaf:node
le :: 0':s → 0':s → true:false
length :: nil:cons:leaf:node → 0':s
toList :: nil:cons:leaf:node → nil:cons:leaf:node
true :: true:false
false :: true:false
s :: 0':s → 0':s
nil :: nil:cons:leaf:node
cons :: nil:cons:leaf:node → nil:cons:leaf:node
leaf :: nil:cons:leaf:node
node :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
append :: nil:cons:leaf:node → nil:cons:leaf:node → nil:cons:leaf:node
a :: c:d
c :: c:d
d :: c:d
hole_nil:cons:leaf:node1_0 :: nil:cons:leaf:node
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
hole_c:d4_0 :: c:d
gen_nil:cons:leaf:node5_0 :: Nat → nil:cons:leaf:node
gen_0':s6_0 :: Nat → 0':s
Lemmas:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
Generator Equations:
gen_nil:cons:leaf:node5_0(0) ⇔ nil
gen_nil:cons:leaf:node5_0(+(x, 1)) ⇔ cons(gen_nil:cons:leaf:node5_0(x))
gen_0':s6_0(0) ⇔ 0'
gen_0':s6_0(+(x, 1)) ⇔ s(gen_0':s6_0(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
le(gen_0':s6_0(+(1, n8_0)), gen_0':s6_0(n8_0)) → false, rt ∈ Ω(1 + n80)
(32) BOUNDS(n^1, INF)